UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FpHNkzc/WJYMiiNGvhN6sgc4BXyzkH29By3gCJBoQac='
WHERE
key_id = '038ac890ce0ad33591e69e32d4ba99ad519a7fdc5c130d6771a1e6b7ccdb1090'
AND (
token = 'FpHNkzc/WJYMiiNGvhN6sgc4BXyzkH29By3gCJBoQac='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)