UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0N0ltHuyHQRtwnXHlkqRm0orVtE+z7fHnuRJOGAQ9sI='
WHERE
key_id = 'ae4e33533931c89a9ea4c1273b14f38a0a7ca1eb93bbe2073a054f606c5628ff'
AND (
token = '0N0ltHuyHQRtwnXHlkqRm0orVtE+z7fHnuRJOGAQ9sI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)