UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5aUDWO69iYlDJ62Q1Hp5U6W2nGXJYLqq95Qb0kL+OEU='
WHERE
key_id = '5b62dee7d6a4c07628dd7dcd321fdb381593d6a47b4599b917f23fa9256315bf'
AND (
token = '5aUDWO69iYlDJ62Q1Hp5U6W2nGXJYLqq95Qb0kL+OEU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)