UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZByjAquMqrbDlAiu5Zoh2eQ9iVWcIwunjc70rqeFCoo='
WHERE
key_id = 'e4f804ccd27eaed9b7c2382583563ba7c180fee4f0d87459b2325be6709851b6'
AND (
token = 'ZByjAquMqrbDlAiu5Zoh2eQ9iVWcIwunjc70rqeFCoo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)