UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SIt/eArdm4y2En5sA85f86z9wBxGoiuYXYl6MyPLWio='
WHERE
key_id = '7c26ffbb7c7db1ffdeace9b4f75f9f7801cd13e8782cdd182293df510040876f'
AND (
token = 'SIt/eArdm4y2En5sA85f86z9wBxGoiuYXYl6MyPLWio='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)