UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Vihu9LBe44TBtdIccjijAWFLfuxTJiEZElHHiOq2egU='
WHERE
key_id = 'a03e5199fa7b1b7d94f7db251e197794ad7f53cd897b204133fbee9391ff6194'
AND (
token = 'Vihu9LBe44TBtdIccjijAWFLfuxTJiEZElHHiOq2egU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)