UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'y6mritj4gT1Lg7R70XEAxSxmWWZ/wZ9CysQZBT7wCZg='
WHERE
key_id = '07bf726f87446b76911a4e199bc8c0b464b8fcbc70fa4af912bb0ff536e5f3d6'
AND (
token = 'y6mritj4gT1Lg7R70XEAxSxmWWZ/wZ9CysQZBT7wCZg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)