UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1huGO8w1JEVcd67h+KcvbhkAqcP5I1ZqYOTXm6IqlNY='
WHERE
key_id = '27a2b35f6eb53f6a63403ea87eabfccbed53ba27bd26dafbb3bf5c8b55bffff4'
AND (
token = '1huGO8w1JEVcd67h+KcvbhkAqcP5I1ZqYOTXm6IqlNY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)