UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UbZE18ff7nkZrB9LIr+/emNclsgTDPCI7v3Ba1J/0B8='
WHERE
key_id = '70220ba0d3ddcc08c4f28203098c194131f31cfb189179823167f01db34621b4'
AND (
token = 'UbZE18ff7nkZrB9LIr+/emNclsgTDPCI7v3Ba1J/0B8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)