UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tWs61qSyXGMW4+IpBiFj7ox3WQE4tAiKY072mxM6P98='
WHERE
key_id = '53b1570af2be2897a8a04b8a5b33ebe5c3ae330dfe80ae1e22bb172aeeb43cec'
AND (
token = 'tWs61qSyXGMW4+IpBiFj7ox3WQE4tAiKY072mxM6P98='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)