UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '25Ssjb0VIOjYkl5prRo68GiRI7kL5Qp8BR/HT1A/eLM='
WHERE
key_id = 'e286e5e5750ea83c32510d1d7b4ba3a580ad519953e50de4b0cbb6fce4ed4d62'
AND (
token = '25Ssjb0VIOjYkl5prRo68GiRI7kL5Qp8BR/HT1A/eLM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)