UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4wShM/WYkeVmUU45gt4jH+/bqiRvyw+MtaBjF6gVMtQ='
WHERE
key_id = '28bec036484edc9d60fbbb6a95ba7b3bec5bb11354b52dea5bdb656c96c6bbad'
AND (
token = '4wShM/WYkeVmUU45gt4jH+/bqiRvyw+MtaBjF6gVMtQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)