UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hk7xDfsFgNoc08LVAOwrqG/zsTwDVEiQCFOziWSd5X0='
WHERE
key_id = '0fd508068a3239789d3e467e9a3a34f697f18706efed956777ccefb29607c937'
AND (
token = 'hk7xDfsFgNoc08LVAOwrqG/zsTwDVEiQCFOziWSd5X0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)