UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/2MAtxY7Q1tcq9f6wmBGHRf6+v5VXUUtjpC6uIq+xoE='
WHERE
key_id = 'c702edd2484c8c2e6380accb554c22126e2d1a5d55143c8dfb528e7bd532e364'
AND (
token = '/2MAtxY7Q1tcq9f6wmBGHRf6+v5VXUUtjpC6uIq+xoE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)