UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'l6rE4gNlGwYpmD2Mgbr0xk4maY5CgmeTVXvEDmJokvQ='
WHERE
key_id = '76a3357a0f2cd5cce0795daba24463c48dc8fec387a75f8f38a212cffc799362'
AND (
token = 'l6rE4gNlGwYpmD2Mgbr0xk4maY5CgmeTVXvEDmJokvQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)