UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 't3zUEZ2PzCq5d+FTp8MBCSJzNIqxH1GbAz+qiB/tPwk='
WHERE
key_id = '1b5a81ea3a0839da2fda913934746e7533dd413484853c8ec17450c2ac163e5c'
AND (
token = 't3zUEZ2PzCq5d+FTp8MBCSJzNIqxH1GbAz+qiB/tPwk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)