UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VNbYgi/xaWw/GaUA9l/vdIiTu4P6f7Fpff6hwfJFy+c='
WHERE
key_id = '11eba0b74dfeb106da97f903930d6aa880a1cf8b8d65aae65ffa46a3e62dc272'
AND (
token = 'VNbYgi/xaWw/GaUA9l/vdIiTu4P6f7Fpff6hwfJFy+c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)