UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lc/ZigDQ/tDbRglqugj31d8FP09124D+uoStltKKvQk='
WHERE
key_id = 'bbf543b34444514f4b115cf80558beebfcd0f4d9bd4b0ce9d1c8d74cd48c6d25'
AND (
token = 'lc/ZigDQ/tDbRglqugj31d8FP09124D+uoStltKKvQk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)