UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'K5mvxBakYUsl/Wm+6VHrYXkEYQu2MSRgRc5BEkwe+Ew='
WHERE
key_id = '92111b3154e1756016a5183980771c4ddb436954da521ada0f5540fb305671f3'
AND (
token = 'K5mvxBakYUsl/Wm+6VHrYXkEYQu2MSRgRc5BEkwe+Ew='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)