UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'v4xXi9KeKEPAHGKlfEM8SXJK9xj0llLYftu/Dwj5dSo='
WHERE
key_id = '61b9049a876aa8919800ef999f3e6768be026801f7fd33178547e8a966cd7eb2'
AND (
token = 'v4xXi9KeKEPAHGKlfEM8SXJK9xj0llLYftu/Dwj5dSo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)