UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+IeDhwk28PUNfXGqkqB7/mTz1EGftnI4ydDEvNrQrXU='
WHERE
key_id = '0c2fb9d3780cf55cc4c529c2eefdb4f4b542ae2756d2c1157e4bc889b9d44d3d'
AND (
token = '+IeDhwk28PUNfXGqkqB7/mTz1EGftnI4ydDEvNrQrXU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)