UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MPjC/xGrofK78A04ICNfngHfdsxe3ye3+LtHMt840oc='
WHERE
key_id = '928db0a056368a9cecc018934c312d92d895e68d28d8d5a0d5918140ebffd256'
AND (
token = 'MPjC/xGrofK78A04ICNfngHfdsxe3ye3+LtHMt840oc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)