UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VOH3PdfcsqCsgo0vQF+vtT4nm8B8JL/ehaOmwiU8KIQ='
WHERE
key_id = '6b751977b916ac7caa2eba49bdb3c7de3775540d644927529cac803bb0f5251e'
AND (
token = 'VOH3PdfcsqCsgo0vQF+vtT4nm8B8JL/ehaOmwiU8KIQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)